package com.itheima.service.imp;

import com.alibaba.dubbo.config.annotation.Service;
import com.itheima.dao.HeathDao;
import com.itheima.pojo.Exercise;
import com.itheima.service.HeathService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;
import java.util.Random;

@Service
public class HeathServiceImp implements HeathService {
    @Autowired
    private HeathDao heathDao;

    @Override
    public List<Exercise> find(String condition) {
        Random random =new Random();
        int start = random.nextInt(10);
        int end =start+5 ;
//        if(end-start>5){
//           end=start+5;
//        }

        List<Exercise> page = heathDao.find(condition);
        return page;
    }
}
